//
//  ILMusicListTableViewCell.m
//  ILife
//
//  Created by lanou on 15/10/26.
//  Copyright © 2015年 ILife. All rights reserved.
//

#import "ILMusicListTableViewCell.h"
#import <UIImageView+WebCache.h>
@implementation ILMusicListTableViewCell



-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _musicImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_WIDTH*2/3)];
      
        [self.contentView addSubview:_musicImageView];
        
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(30, SCREEN_WIDTH*2/3, SCREEN_WIDTH-60, 30)];
        _titleLabel.font = [UIFont fontWithName:@"Helvetica" size:16];
        [self.contentView addSubview:_titleLabel];
    }

    return self;
}

-(void)setMusicListModel:(ILMusicListModel *)musicListModel
{
    _musicListModel = musicListModel;
    [_musicImageView sd_setImageWithURL:[NSURL URLWithString: musicListModel.image]placeholderImage:[UIImage imageNamed:@"ilife"]];
    _titleLabel.text = musicListModel.articleData.songname;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
